package bus;

import java.util.List;

import dao.AnswerDAO;
import dto.AnswerDTO;

public class AnswerBUS {
	public AnswerDTO info = new AnswerDTO();
	public AnswerDAO data = new AnswerDAO(null);
	
	public void setInfo(AnswerDTO answer) {
		this.info = answer;
	}
	
	public AnswerDTO getInfo() {
		return this.info;
	}
	
	public void addAnswer() {
		data.addAnswer(info);
	}
	
	public List<AnswerDTO> getAllAnswers(){
		return data.getAllAnswers();
	}
	
	public boolean updateAnswer(){
		return data.updateAnswer(info);
	}
	
	public void deleteAnswer(){
		data.deleteAnswer(info);
	}
	
	public void deleteAllAnswers(){
		data.deleteAllAnswers();
	}
	
	public int getAnswerCount(){
		return data.getAnswerCount();
	}
}
